// 主页
const home = {
	state: {
  	showTabPanel: false,
  	winWidth: 0,
  	winHeight: 0,
  	bannerData: null,
  	themeData: null,
  	showToTop: false,
  },
	mutations: {
		'SET_SHOW_TAB_PANEL': (state, newVal) => {
			state.showTabPanel = newVal
		},
		'SET_WIN_WIDTH': (state, newVal) => {
			state.winWidth = newVal
		},
		'SET_WIN_HEIGHT': (state, newVal) => {
			state.winHeight = newVal
		},
		'SET_BANNER_DATA': (state, newVal) => {
			state.bannerData = newVal
		},
		'SET_THEME_DATA': (state, newVal) => {
			state.themeData = newVal
		},
		'SET_SHOW_TOTOP': (state, newVal) => {
			state.showToTop = newVal
		}
	},
	actions: {
		setShowTabPanel: ({commit, state}, newVal) => {
			return commit('SET_SHOW_TAB_PANEL',newVal)
		},
		setWinWidth: ({commit, state}, newVal) => {
			return commit('SET_WIN_WIDTH',newVal)
		},
		setWinHeight: ({commit, state}, newVal) => {
			return commit('SET_WIN_HEIGHT',newVal)
		},
		setThemeData: ({commit, state}, newVal) => {
			return commit('SET_THEME_DATA',newVal)
		},
		setShowToTop: ({commit, state}, newVal) => {
			return commit('SET_SHOW_TOTOP',newVal)
		}
	}
}

export default home
